/** 生成的文件，请勿修改 **/

import gql from "graphql-tag";

import * as APIModel from "./api.model";

import { Utilts } from "@/utils/utilts"

/***
 *查询Gql 
*/
class QueryGQL {
	/*** 查询所有后台用户 */
	static FINDALLUSERS = (fields: string) => {
		const str = `query findAllUsers {
			dataSource: findAllUsers {${fields}}}`
		return gql(str);
	}

	/*** 根据Id查询后台用户 */
	static FINDUSERBYID = (fields: string) => {
		const str = `query findUserById($id: BigInt!) {
			dataSource: findUserById(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 根据Json查询后台用户List */
	static FINDUSERWHERELIST = (fields: string) => {
		const str = `query findUserWhereList($jsonQuery: SearchUserInput!) {
			dataSource: findUserWhereList(jsonQuery: $jsonQuery) {${fields}}}`
		return gql(str);
	}

	/*** 根据Json查询后台用户One */
	static FINDUSERWHEREONE = (fields: string) => {
		const str = `query findUserWhereOne($jsonQuery: SearchUserInput!) {
			dataSource: findUserWhereOne(jsonQuery: $jsonQuery) {${fields}}}`
		return gql(str);
	}

	/*** 分页查询后台用户 */
	static FINDUSERPAGE = (fields: string) => {
		const str = `query findUserPage($pageInput: PageUserInput!) {
			dataSource: findUserPage(pageInput: $pageInput) {${fields}}}`
		return gql(str);
	}


	static ACCOUNT = (fields: string) => {
		const str = `query account {
			dataSource: account {${fields}}}`
		return gql(str);
	}


	static LOGINUSER = (fields: string) => {
		const str = `query loginUser($email: String!, $password: String!) {
			dataSource: loginUser(email: $email, password: $password) {${fields}}}`
		return gql(str);
	}

	/*** 查询所有后台菜单 */
	static FINDALLMENUS = (fields: string) => {
		const str = `query findAllMenus {
			dataSource: findAllMenus {${fields}}}`
		return gql(str);
	}

	/*** 根据Id查询后台菜单 */
	static FINDMENUBYID = (fields: string) => {
		const str = `query findMenuById($id: BigInt!) {
			dataSource: findMenuById(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 根据Json查询后台菜单List */
	static FINDMENUWHERELIST = (fields: string) => {
		const str = `query findMenuWhereList($jsonQuery: SearchMenuSortInput!) {
			dataSource: findMenuWhereList(jsonQuery: $jsonQuery) {${fields}}}`
		return gql(str);
	}

	/*** 根据Json查询后台菜单One */
	static FINDMENUWHEREONE = (fields: string) => {
		const str = `query findMenuWhereOne($jsonQuery: SearchMenuSortInput!) {
			dataSource: findMenuWhereOne(jsonQuery: $jsonQuery) {${fields}}}`
		return gql(str);
	}

	/*** 分页查询后台菜单 */
	static FINDMENUPAGE = (fields: string) => {
		const str = `query findMenuPage($pageInput: PageMenuInput!) {
			dataSource: findMenuPage(pageInput: $pageInput) {${fields}}}`
		return gql(str);
	}

	/*** 查询所有后台角色 */
	static FINDALLROLES = (fields: string) => {
		const str = `query findAllRoles {
			dataSource: findAllRoles {${fields}}}`
		return gql(str);
	}

	/*** 根据Id查询后台角色 */
	static FINDROLEBYID = (fields: string) => {
		const str = `query findRoleById($id: BigInt!) {
			dataSource: findRoleById(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 根据Json查询后台角色List */
	static FINDROLEWHERELIST = (fields: string) => {
		const str = `query findRoleWhereList($jsonQuery: SearchRoleSortInput!) {
			dataSource: findRoleWhereList(jsonQuery: $jsonQuery) {${fields}}}`
		return gql(str);
	}

	/*** 根据Json查询后台角色One */
	static FINDROLEWHEREONE = (fields: string) => {
		const str = `query findRoleWhereOne($jsonQuery: SearchRoleSortInput!) {
			dataSource: findRoleWhereOne(jsonQuery: $jsonQuery) {${fields}}}`
		return gql(str);
	}

	/*** 分页查询后台角色 */
	static FINDROLEPAGE = (fields: string) => {
		const str = `query findRolePage($pageInput: PageRoleInput!) {
			dataSource: findRolePage(pageInput: $pageInput) {${fields}}}`
		return gql(str);
	}

	/*** 查询所有后台权限 */
	static FINDALLPOWERS = (fields: string) => {
		const str = `query findAllPowers {
			dataSource: findAllPowers {${fields}}}`
		return gql(str);
	}

	/*** 根据Id查询后台权限 */
	static FINDPOWERBYID = (fields: string) => {
		const str = `query findPowerById($id: BigInt!) {
			dataSource: findPowerById(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 根据Json查询后台权限List */
	static FINDPOWERWHERELIST = (fields: string) => {
		const str = `query findPowerWhereList($jsonQuery: SearchPowerSortInput!) {
			dataSource: findPowerWhereList(jsonQuery: $jsonQuery) {${fields}}}`
		return gql(str);
	}

	/*** 根据Json查询后台权限One */
	static FINDPOWERWHEREONE = (fields: string) => {
		const str = `query findPowerWhereOne($jsonQuery: SearchPowerSortInput!) {
			dataSource: findPowerWhereOne(jsonQuery: $jsonQuery) {${fields}}}`
		return gql(str);
	}

	/*** 分页查询后台权限 */
	static FINDPOWERPAGE = (fields: string) => {
		const str = `query findPowerPage($pageInput: PagePowerInput!) {
			dataSource: findPowerPage(pageInput: $pageInput) {${fields}}}`
		return gql(str);
	}

	/*** 查询所有游戏活动 */
	static FINDALLACTIVITYS = (fields: string) => {
		const str = `query findAllActivitys {
			dataSource: findAllActivitys {${fields}}}`
		return gql(str);
	}

	/*** 根据Id查询游戏活动 */
	static FINDACTIVITYBYID = (fields: string) => {
		const str = `query findActivityById($id: BigInt!) {
			dataSource: findActivityById(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 根据Json查询游戏活动List */
	static FINDACTIVITYWHERELIST = (fields: string) => {
		const str = `query findActivityWhereList($jsonQuery: SearchActivityInput!) {
			dataSource: findActivityWhereList(jsonQuery: $jsonQuery) {${fields}}}`
		return gql(str);
	}

	/*** 根据Json查询游戏活动One */
	static FINDACTIVITYWHEREONE = (fields: string) => {
		const str = `query findActivityWhereOne($jsonQuery: SearchActivityInput!) {
			dataSource: findActivityWhereOne(jsonQuery: $jsonQuery) {${fields}}}`
		return gql(str);
	}

	/*** 分页查询游戏活动 */
	static FINDACTIVITYPAGE = (fields: string) => {
		const str = `query findActivityPage($pageInput: PageActivityInput!) {
			dataSource: findActivityPage(pageInput: $pageInput) {${fields}}}`
		return gql(str);
	}


	static PLAYERMODELDATAS = (fields: string) => {
		const str = `query playerModelDatas {
			dataSource: playerModelDatas {${fields}}}`
		return gql(str);
	}


	static PLAYERMODELDATA = (fields: string) => {
		const str = `query playerModelData($id: Int!) {
			dataSource: playerModelData(id: $id) {${fields}}}`
		return gql(str);
	}


	static ROLEMODELDATAS = (fields: string) => {
		const str = `query roleModelDatas {
			dataSource: roleModelDatas {${fields}}}`
		return gql(str);
	}


	static ROLEMODELDATA = (fields: string) => {
		const str = `query roleModelData($id: Int!) {
			dataSource: roleModelData(id: $id) {${fields}}}`
		return gql(str);
	}

}

/***
 *变更Gql 
*/
class MutationGQL {
	/*** 创建用户 */
	static CREATEUSER = (fields: string) => {
		const str = `mutation createUser($createUserInput: CreateUserInput!) {
			dataSource: createUser(createUserInput: $createUserInput) {${fields}}}`
		return gql(str);
	}

	/*** 修改后台用户 */
	static UPDATEUSER = (fields: string) => {
		const str = `mutation updateUser($id: BigInt!, $updateUserInput: UpdateUserInput!) {
			dataSource: updateUser(id: $id, updateUserInput: $updateUserInput) {${fields}}}`
		return gql(str);
	}

	/*** 软删除后台用户 */
	static SOFTDELETEUSER = (fields: string) => {
		const str = `mutation softDeleteUser($id: BigInt!) {
			dataSource: softDeleteUser(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 真删除后台用户 */
	static HARDDELETEUSER = (fields: string) => {
		const str = `mutation hardDeleteUser($id: BigInt!) {
			dataSource: hardDeleteUser(id: $id) {${fields}}}`
		return gql(str);
	}


	static UPDATEUSERPWD = (fields: string) => {
		const str = `mutation updateUserPwd($updateUserPwd: UpdatePasswordInput!) {
			dataSource: updateUserPwd(updateUserPwd: $updateUserPwd) {${fields}}}`
		return gql(str);
	}


	static LOGIN = (fields: string) => {
		const str = `mutation login($loginUserInput: LoginUserInput!) {
			dataSource: login(loginUserInput: $loginUserInput) {${fields}}}`
		return gql(str);
	}

	/*** 创建后台菜单 */
	static CREATEMENU = (fields: string) => {
		const str = `mutation createMenu($createMenuInput: CreateMenuInput!) {
			dataSource: createMenu(createMenuInput: $createMenuInput) {${fields}}}`
		return gql(str);
	}

	/*** 修改后台菜单 */
	static UPDATEMENU = (fields: string) => {
		const str = `mutation updateMenu($id: BigInt!, $updateMenuInput: UpdateMenuInput!) {
			dataSource: updateMenu(id: $id, updateMenuInput: $updateMenuInput) {${fields}}}`
		return gql(str);
	}

	/*** 软删除后台菜单 */
	static SOFTDELETEMENU = (fields: string) => {
		const str = `mutation softDeleteMenu($id: BigInt!) {
			dataSource: softDeleteMenu(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 真删除后台菜单 */
	static HARDDELETEMENU = (fields: string) => {
		const str = `mutation hardDeleteMenu($id: BigInt!) {
			dataSource: hardDeleteMenu(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 创建后台角色 */
	static CREATEROLE = (fields: string) => {
		const str = `mutation createRole($createRoleInput: CreateRoleInput!) {
			dataSource: createRole(createRoleInput: $createRoleInput) {${fields}}}`
		return gql(str);
	}

	/*** 修改后台角色 */
	static UPDATEROLE = (fields: string) => {
		const str = `mutation updateRole($id: BigInt!, $updateRoleInput: UpdateRoleInput!) {
			dataSource: updateRole(id: $id, updateRoleInput: $updateRoleInput) {${fields}}}`
		return gql(str);
	}

	/*** 软删除后台角色 */
	static SOFTDELETEROLE = (fields: string) => {
		const str = `mutation softDeleteRole($id: BigInt!) {
			dataSource: softDeleteRole(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 真删除后台角色 */
	static HARDDELETEROLE = (fields: string) => {
		const str = `mutation hardDeleteRole($id: BigInt!) {
			dataSource: hardDeleteRole(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 创建后台权限 */
	static CREATEPOWER = (fields: string) => {
		const str = `mutation createPower($createPowerInput: CreatePowerInput!) {
			dataSource: createPower(createPowerInput: $createPowerInput) {${fields}}}`
		return gql(str);
	}

	/*** 修改后台权限 */
	static UPDATEPOWER = (fields: string) => {
		const str = `mutation updatePower($id: BigInt!, $updatePowerInput: UpdatePowerInput!) {
			dataSource: updatePower(id: $id, updatePowerInput: $updatePowerInput) {${fields}}}`
		return gql(str);
	}

	/*** 软删除后台权限 */
	static SOFTDELETEPOWER = (fields: string) => {
		const str = `mutation softDeletePower($id: BigInt!) {
			dataSource: softDeletePower(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 真删除后台权限 */
	static HARDDELETEPOWER = (fields: string) => {
		const str = `mutation hardDeletePower($id: BigInt!) {
			dataSource: hardDeletePower(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 创建游戏活动 */
	static CREATEACTIVITY = (fields: string) => {
		const str = `mutation createActivity($createActivityInput: CreateActivityInput!) {
			dataSource: createActivity(createActivityInput: $createActivityInput) {${fields}}}`
		return gql(str);
	}

	/*** 修改游戏活动 */
	static UPDATEACTIVITY = (fields: string) => {
		const str = `mutation updateActivity($id: BigInt!, $updateActivityInput: UpdateActivityInput!) {
			dataSource: updateActivity(id: $id, updateActivityInput: $updateActivityInput) {${fields}}}`
		return gql(str);
	}

	/*** 软删除游戏活动 */
	static SOFTDELETEACTIVITY = (fields: string) => {
		const str = `mutation softDeleteActivity($id: BigInt!) {
			dataSource: softDeleteActivity(id: $id) {${fields}}}`
		return gql(str);
	}

	/*** 真删除游戏活动 */
	static HARDDELETEACTIVITY = (fields: string) => {
		const str = `mutation hardDeleteActivity($id: BigInt!) {
			dataSource: hardDeleteActivity(id: $id) {${fields}}}`
		return gql(str);
	}


	static REMOVEPLAYERMODELDATUM = (fields: string) => {
		const str = `mutation removePlayerModelDatum($id: Int!) {
			dataSource: removePlayerModelDatum(id: $id) {${fields}}}`
		return gql(str);
	}


	static REMOVEROLEMODELDATUM = (fields: string) => {
		const str = `mutation removeRoleModelDatum($id: Int!) {
			dataSource: removeRoleModelDatum(id: $id) {${fields}}}`
		return gql(str);
	}

}

/** 查询，变更GQL **/
export const GQL = {
	Query: QueryGQL,
	Mutation: MutationGQL
}